import traceback
import sys
from MdbHelper import MdbHelper
import pyodbc

path = "D:\\work\\Укрупнение\\current\\pyExcelCons3\\msa\\КПК_все.mdb"

if __name__=="__main__":
    try:
        drivers = [i for i in pyodbc.drivers() if i.startswith('Microsoft Access Driver')]
        print(drivers)
        print("is 64 bit:",sys.maxsize > 2**32)

        mdb = MdbHelper(path)
        print(mdb.connection_str)
        mdb.connect()
        info = mdb.db_info()
        print(f"info: {info}")
        df = mdb.get_table_df("Справочник МТР1")
        print(df)
        mdb.close_connection()
    except Exception as exp:
       print(traceback.format_exc()) 